"""webssh URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, re_path
from user_system import views
from user_system import role_views
from user_system import user_views
from user_system import permission_views
from user_system import gameserver_group_views

urlpatterns = [
    path('login/', views.login),
    path('welcome/', views.welcome),
    path('index/', views.index),

    ########角色管理url开始########
    path('role_list/', role_views.role_list),
    path('role_add/', role_views.role_add),
    re_path('role_permissions_setting-(?P<role_id>\d+)/', role_views.role_permissions_setting),
    ########角色管理url结束########

    ########用户管理url开始########
    path('user_list/', user_views.user_list_info),
    path('user_info/', user_views.user_info),
    path('user_add/', user_views.user_add),
    re_path('user_edit-(?P<user_id>\d+)/', user_views.user_edit),
    path('user_del/', user_views.user_del),
    ########用户管理url结束########

    ########项目管理url开始########
    path('project_list/', permission_views.project_list),
    path('project_add/', permission_views.project_add),
    re_path('project_edit-(?P<project_id>\d+)/', permission_views.project_edit),
    path('project_del/', permission_views.project_del),
    ########项目管理url结束########

    ########权限配置url开始########
    path('permission_set/', permission_views.permission_set),
    ########权限配置url结束########

    ########游戏分区管理 url开始########
    path('gameserver_group_list/', gameserver_group_views.gameserver_group_list),
    path('gameserver_group_add/', gameserver_group_views.gameserver_group_add),
    re_path('gameserver_group_edit-(?P<gameserver_group_id>\d+)/', gameserver_group_views.gameserver_group_edit),
    path('gameserver_group_del/', gameserver_group_views.gameserver_group_del),
    ########游戏分区管理 url结束########

    path('icon/', views.icon),
    path('dev_record/', views.dev_record),
    path('dev_record_add/', views.dev_record_add),
]
